{% extends 'root.html' %}

{% block title %}
cli
{% endblock %}

{% block root_content %}

    <div id="input" class="mainLocation">
        {% block command_input %}
        <form action="{% url cli_action_handler %}" method="post">
            {% csrf_token %}
            <input id="command_input" type="text" name="c" />
            <input type="hidden" name="account_id" value="{{ account.id }}" />
            <input type="hidden" name="payment_id" value="{{ payment.id }}" />
            <input type="hidden" name="card_id" value="{{ card.id }}" />
            <input class="submit" type="submit" value="Run" />
        </form>
        {% endblock %}
    </div>

    <div id="location_div" class="mainLocation">
        {% block location %}
            <div class="nav"><a href="{% url accounts %}">Home</a></div>
        {% endblock %}
        
    </div>
    
    <div class="container">
        
        <div id="menu" class="mainLocation contentLocation cliCommands">
            <div>
            <table id="cliInfo" class="info">
                <tr>
                    <th>
                        Command
                    </th>
                    <th>
                        Description
                    </th>
                </tr>
                <tr>
                    <td>home</td>
                    <td>list accounts</td>
                </tr>
                <tr>
                    <td>account [id]</td>
                    <td>account info/select account</td>
                </tr>
                <tr>
                    <td>history</td>
                    <td>account(s) history</td>
                </tr>
                <tr>
                    <td>payment [id]</td>
                    <td>payment detail</td>
                </tr>
                <tr>
                    <td>transfer</td>
                    <td>transfer money between own accounts</td>
                </tr>
                <tr>
                    <td>back</td>
                    <td>back to previous</td>
                </tr>
                <tr>
                    <td>accounts</td>
                    <td>list accounts</td>
                </tr>
                <tr>
                    <td>newpayment</td>
                    <td>new payment</td>
                </tr>
                <tr>
                    <td>cards</td>
                    <td>list cards</td>
                </tr>
                <tr>
                    <td>card [id]</td>
                    <td>card detail</td>
                </tr>
                <tr>
                    <td>logout</td>
                    <td>logout</td>
                </tr>
                <tr>
                    <td>login</td>
                    <td>login</td>
                </tr>
            </table>
            </div>
        </div>
            
        <div id="bank" class="mainLocation mainStyle contentLocation">
            {% block content %}
            {% if error %}
                <p><span class="error">{{ error }}</span></p>
            {% endif %}
            {% endblock %}
        </div>

    </div>

{% endblock %}
